PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Dialog Manager >

Mac OS 8.5 Dialog Manager Reference


SetDialogTimeout

Simulates an item selection in a modal dialog box after a specified amount of time elapses.

pascal OSStatus SetDialogTimeout (
                     DialogPtr inDialog,
                     SInt16 inButtonToPress,
                     UInt32 inSecondsToWait);
inDialog
A value of type DialogPtr . Pass a pointer to the dialog box for which an item selection is to be simulated.
inButtonToPress
A signed 16-bit integer. Pass a value representing the number within the item list of the item that is to be selected.
inSecondsToWait
An unsigned 32-bit integer. Pass a value specifying the number of seconds that are to elapse before the Dialog Manager simulates an item selection. Pass 0 to clear a preexisting timeout value and cease the countdown in progress.
function result
A result code. See Result Codes for the Mac OS 8.5 Dialog Manager .

DISCUSSION

Your application calls the SetDialogTimeout function each time you wish to start a countdown of the specified duration for a given modal dialog box. When the amount of time specified in the inSecondsToWait parameter has elapsed, the Dialog Manager simulates a click on the button specified in the inButtonToPress parameter. If your application calls SetDialogTimeout again, or if any event is received for the dialog box, the countdown is restarted.

In order to use SetDialogTimeout with a given modal dialog box, your application must handle events for the dialog box through the ModalDialog function. The Dialog Manager will not simulate an item selection for the dialog box until ModalDialog processes an event (including null events).


VERSION NOTES

Available with Mac OS 8.5 and later.


SEE ALSO

The function GetDialogTimeout .


© 1999 Apple Computer, Inc. — (Last Updated 19 Jan 99)